@prefix-cls: need-update;
@prefix-plancls: plan-detailtabel;

.overflow() {
  overflow-y: hidden;
  overflow-x: hidden;
}

.displayDirection() {
  display: flex;
  flex-direction: column;
}

/* 公共纵向弹性盒 */
.getDisplay() {
  display: flex;
  flex-direction: column;
}

.ant-table {
  .double-row {
    td {
      background: #fff;
    }
  }

  .default-row {
    td {
      background: #fafafa;
    }
  }
}

.@{prefix-cls} {
  width: 100%;
  flex: auto;

  .material-form {
    height: 100%;
    overflow: hidden;
  }

  &-material-tableTitle {
    text-align: center;
    line-height: 50px;
    font-weight: 600;
    font-size: 1.1rem;
  }

  // 显示3个Table的样式
  &-material-table {
    // height: 50%;
    height: 450px;
    overflow: hidden;

    .list-table {
      height: calc(100% - 50px);
    }

    .ant-table-wrapper .ant-spin-nested-loading .ant-spin-container .ant-table {
      overflow: hidden;
      margin: 0;

      .ant-form-item {
        margin-bottom: 0px;
      }

      .ant-table-footer {
        height: 45px;
        display: flex;
        align-items: center;
      }
    }

    .ant-table-wrapper .ant-spin-nested-loading .ant-spin-container .ant-table .ant-table-container {
      height: calc(100% - 50px);
    }

    &-sum {
      strong {
        color: red;
        display: inline-block;
        transform: scale(1.1);
      }
    }
  }

  // 显示一个table的样式
  &-material-tableHeight {
    height: 100%;
    overflow: hidden;

    .list-table {
      // height: calc(100% - 50px);
    }

    .ant-table-wrapper .ant-spin-nested-loading .ant-spin-container .ant-table {
      overflow: hidden;
      margin: 0;

      .ant-form-item {
        margin-bottom: 0px;
      }

      .ant-table-footer {
        height: 45px;
        display: flex;
        align-items: center;
      }
    }

    .ant-table-wrapper .ant-spin-nested-loading .ant-spin-container .ant-table .ant-table-container {
      height: calc(100% - 50px);
    }

    &-sum {
      strong {
        color: red;
        display: inline-block;
        transform: scale(1.1);
      }
    }
  }

  .baseinfo-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px 0px;
    border-top: 1px dashed #cdcdcd;
  }

  #audit-record-drawer,
  .audit-apply-drawer {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 100%;
  }

  // 时间轴样式
  &-TimelineStyle {
    .ant-timeline-item-last {
      .ant-timeline-item:last-child {
        .ant-timeline-item-tail {
          display: none;
        }
      }
    }

    // 时间icon下移
    .ant-timeline-item-head-custom {
      top: 17.5px;
    }

    // 时间icon之间的线条整体下移
    .ant-timeline-item-tail {
      top: 18px;
    }

    &-ColTitle {
      font-weight: 700;
      font-size: 17px;
      line-height: 35px;
    }

    &-ColState {
      font-weight: 600;
      font-size: 16px;
    }

    &-spanWeight {
      font-weight: 600;
      color: #3c3c3c;
    }

    &-spanLabel {
      color: #6e6e6e;
    }
  }

  &-oneModal {
    &-oneModalBox {
      height: 100%;
      overflow: hidden;
      margin: 10px 0;

      &-gander {
        width: 15px;
        height: 100%;
      }

      > .ant-col {
        height: 100%;
        overflow: hidden;
      }

      &-FormTable {
        display: flex;
        flex-direction: column;
        height: 100%;
        overflow: hidden;

        .listTable-zIndexStyle {
          flex: auto;

          .ant-spin-container {
            .ant-table {
              margin: 0 !important;
            }
          }

          .ant-pagination {
            margin: 0rem 0rem !important;

            .ant-pagination-total-text {
              flex: auto;
            }
          }
        }

        .ant-form-item {
          margin-bottom: 0px;
        }

        .ant-table-content {
          height: 100%;
        }
      }

      .need-update-oneModalBox-leftcard {
        height: 100%;
        overflow: hidden;
        display: flex;
        flex-direction: column;

        .ant-card-head {
          min-height: 50px;
        }

        .ant-card-body {
          height: 100%;
          overflow: hidden;
        }
      }
    }
  }

  &-MaterialModalRightCard {
    .ant-card-body {
      padding: 0 !important;
    }

    .ant-card-head-title {
      line-height: 34px;
    }
  }

  &-selectMaterialTypeBox {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
  }

  &-updateCollapse {
    background-color: #ffffff;

    .ant-collapse-item,
    .ant-collapse-item-active {
      border-bottom: 0px !important;
    }

    .ant-divider-horizontal.ant-divider-with-text {
      margin: 0px;
    }

    .ant-divider-inner-text {
      font-weight: 600;
    }

    .ant-collapse-content > .ant-collapse-content-box {
      padding: 5px 40px 5px 10px;
    }

    .ant-collapse-item {
      border-bottom: none;
      background-color: #ffffff;

      .ant-collapse-header {
        padding: 6px 16px;
      }
    }
  }

  // 时间轴样式
  &-TimelineStyle {
    .ant-timeline-item-last {
      .ant-timeline-item:last-child {
        .ant-timeline-item-tail {
          display: none;
        }
      }
    }

    // 时间icon下移
    .ant-timeline-item-head-custom {
      top: 17.5px;
    }

    // 时间icon之间的线条整体下移
    .ant-timeline-item-tail {
      top: 18px;
    }

    &-ColTitle {
      font-weight: 700;
      font-size: 17px;
      line-height: 35px;
    }

    &-ColState {
      font-weight: 600;
      font-size: 16px;
    }

    &-spanWeight {
      font-weight: 600;
      color: #3c3c3c;
    }

    &-spanLabel {
      color: #6e6e6e;
    }
  }

  // 时间轴样式
  &-tmplTimeline {
    width: 100%;
    padding: 10px 10px 0px;

    .ant-timeline.ant-timeline-alternate .ant-timeline-item-left .ant-timeline-item-content,
    .ant-timeline.ant-timeline-right .ant-timeline-item-left .ant-timeline-item-content,
    .ant-timeline.ant-timeline-label .ant-timeline-item-left .ant-timeline-item-content {
      left: calc(50% - 121px);
      width: 50%;
    }

    .ant-timeline.ant-timeline-label .ant-timeline-item-label {
      width: calc(30% - 15px);
    }

    .ant-timeline.ant-timeline-label .ant-timeline-item-tail {
      left: 30%;
    }

    .ant-timeline.ant-timeline-label .ant-timeline-item-head-custom {
      left: 30%;
    }

    .ant-timeline.ant-timeline-pending .ant-timeline-item-last .ant-timeline-item-tail {
      border-left: 2px solid #f0f0f0;
    }

    .ant-timeline-item-content {
      // left: calc(50% - 122px);
      left: 30%;
      width: 70%;
      margin: 0px 0px 0px 15px;
      min-height: 80px;
    }

    .ant-timeline-item {
      padding: 0px;
    }

    /**
      * 邮编内容
      */
    &-contentRow {
      .ant-col {
        margin-bottom: 5px;
      }
    }

    /**
      * 左侧时间 日期
      */
    &-leftDateSpan {
      font-weight: 700;
    }

    &-leftHourSpan {
      color: #949494;
      font-size: 14;
    }

    &-contantLable {
      color: #818181;

      &-userInfoText {
        color: #3f3f3f;
      }
    }
  }

  &-Descriptions {
    .ant-descriptions-row {
      .ant-descriptions-item-label {
        width: 165px;
      }
    }
  }

  &-addEngIneer {
    .ant-switch {
      min-width: 55px !important;
    }
  }

  //OA页面样式
  &-infoViewOA {
    height: 100%;
    width: 100%;
    .displayDirection();
    .overflow();

    &-centerBodyTitleBox {
      text-align: center;
      font-weight: 700;
      font-size: 24px;
    }

    &-titleBox {
      display: flex;
      justify-content: space-between;
      background-color: #fff;
      border-radius: 5px;
      align-items: center;
      padding: 0px 10px;

      &-textValue {
        font-size: 22px;
        padding: 10px 0px;
      }
    }

    &-centerBox {
      flex: auto;
      background: #fff;
      margin: 6px 0px;
      border-radius: 5px;
      padding: 10px 0px;
      overflow: hidden;
    }

    &-bottomBtnBox {
      background-color: #fff;
      border-radius: 5px;

      &-spaceItemBox {
        display: flex;
        justify-content: center;
        padding: 0px 10px;
      }

      &-spaceItemBox > .ant-space > .ant-space-item {
        margin: 10px 0px;
      }
    }
  }

  // 流程办理
  &-flowListView {
    width: 100%;
    height: 100%;
    padding: 0px 100px;
    overflow: hidden;
    display: flex;
    flex-direction: column;

    &-workflowTbodyRootDiv {
      width: 100%;
      flex: auto;
      height: 30%;
      overflow: hidden;

      .ant-empty {
        margin: 0px;
        padding: 50px 0px;
        border-left: 1px solid #d7d7d7;
        border-right: 1px solid #d7d7d7;
        border-bottom: 1px solid #d7d7d7;
      }

      table {
        border-left: 1px solid #d7d7d7;
        border-right: 1px solid #d7d7d7;
        border-bottom: 1px solid #d7d7d7;
      }

      td {
        padding: 10px;
      }

      tr:not(:first-child) {
        border-top: 1px solid #d7d7d7;
      }
    }
  }

  &-workflowNodesTableTitle {
    border-top: 1px solid #d7d7d7;
    overflow: hidden;

    &-tableTheadBox {
      text-align: left;
      border: 1px solid #d7d7d7;

      th {
        padding: 10px;
        background-color: #f7f7f7;
      }
    }
  }
}

.@{prefix-plancls} {
  &-rootBox {
    height: 100%;
    flex: auto;
    overflow: hidden;

    &-materilTable {
      overflow: hidden;
    }

    .ant-card-body {
      .ant-spin-nested-loading {
        height: 100%;
        overflow: hidden;

        .ant-spin-container {
          height: 100%;
          overflow: hidden;
          display: flex;
          flex-direction: column;
        }
      }
    }
  }
}

// 物料管理-详情页面-预览图片组件放置在div中
.needUpdateView-imageBox {
  .ant-switch {
    min-width: 55px !important;
  }

  .ant-image-preview-mask {
    position: absolute;
  }

  .ant-image-preview-wrap {
    position: absolute;
  }

  .ant-image-preview-operations-wrapper {
    position: absolute;

    .ant-image-preview-switch-right {
      right: 65px !important;
    }

    .ant-image-preview-switch-left {
      left: 344px !important;
    }
  }
}

.materialBatchBox {
  .ant-form {
    .ant-form-item-label {
      width: 210px !important;
    }

    .uploadBottomWidth {
      // padding-left: 210px !important;
    }
  }
}
